﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Practices.Composite.Modularity;
using Microsoft.Practices.Composite.Regions;
using Microsoft.Practices.Unity;

namespace DiscoveryLogic.Analytics.Modules.Entities
{
    public class PubModule:IModule
    {
        public IUnityContainer Container { get; private set; }
		public IRegionManager RegionManager { get; private set; }

        public PubModule(IUnityContainer container, IRegionManager regionManager)
		{
			Container = container;
			RegionManager = regionManager;
		}

        public void Initialize()
        {
            PubView pubView = Container.Resolve<PubView>();
            // force event subscription 
            // pubView.Pub = null;
            RegionManager.Regions["EntityDetailRegion"].Add(pubView);
        }
    }
}
